package com.KKd.service;

import com.KKd.mapper.ChainMapper;
import com.KKd.pojo.Chain;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 14587
 * @date 2020/11/11 7:46
 */
@Service
public class ChainServiceImpl implements ChainService{
    @Autowired
    private ChainMapper chainMapper;

    public void setChainMapper(ChainMapper chainMapper) {
        this.chainMapper = chainMapper;
    }

    public int addChain(Chain friendChain) {
        return chainMapper.addChain(friendChain);
    }

    public int deleteChainById(Integer chainId) {
        return chainMapper.deleteChainById(chainId);
    }

    public int setChainFirstById(Integer chainId) {
        return chainMapper.setChainFirstById(chainId);
    }

    public List<Chain> queryChains() {
        return chainMapper.queryChains();
    }
}
